home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Interfaces / Universal Interfaces 2.0a3 / Universal AIncludes / MachineExceptions.a < prev    next >
Encoding:
Text File  |  1994-11-11  |  3.1 KB  |  131 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        MachineExceptions.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.  
  17.     IF &TYPE('__MACHINEEXCEPTIONS__') = 'UNDEFINED' THEN
  18. __MACHINEEXCEPTIONS__ SET 1
  19.  
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24. ;        include 'ConditionalMacros.a'                                ;
  25. ; Machine Dependent types for PowerPC: 
  26. MachineInformationPowerPC RECORD    0
  27. CTR                         ds        UnsignedWide
  28. LR                         ds        UnsignedWide
  29. PC                         ds        UnsignedWide
  30. CR                         ds.l    1
  31. XER                         ds.l    1
  32. MSR                         ds.l    1
  33. sizeof                     EQU    36
  34.                         ENDR
  35.  
  36. RegisterInformationPowerPC RECORD    0
  37. R0                         ds        UnsignedWide
  38. R1                         ds        UnsignedWide
  39. R2                         ds        UnsignedWide
  40. R3                         ds        UnsignedWide
  41. R4                         ds        UnsignedWide
  42. R5                         ds        UnsignedWide
  43. R6                         ds        UnsignedWide
  44. R7                         ds        UnsignedWide
  45. R8                         ds        UnsignedWide
  46. R9                         ds        UnsignedWide
  47. R10                         ds        UnsignedWide
  48. R11                         ds        UnsignedWide
  49. R12                         ds        UnsignedWide
  50. R13                         ds        UnsignedWide
  51. R14                         ds        UnsignedWide
  52. R15                         ds        UnsignedWide
  53. R16                         ds        UnsignedWide
  54. R17                         ds        UnsignedWide
  55. R18                         ds        UnsignedWide
  56. R19                         ds        UnsignedWide
  57. R20                         ds        UnsignedWide
  58. R21                         ds        UnsignedWide
  59. R22                         ds        UnsignedWide
  60. R23                         ds        UnsignedWide
  61. R24                         ds        UnsignedWide
  62. R25                         ds        UnsignedWide
  63. R26                         ds        UnsignedWide
  64. R27                         ds        UnsignedWide
  65. R28                         ds        UnsignedWide
  66. R29                         ds        UnsignedWide
  67. R30                         ds        UnsignedWide
  68. R31                         ds        UnsignedWide
  69. sizeof                     EQU    256
  70.                         ENDR
  71.  
  72. FPUInformationPowerPC     RECORD    0
  73. Registers                 ds.b    32 * UnsignedWide
  74. FPSCR                     ds.l    1
  75. Reserved                 ds.l    1
  76. sizeof                     EQU    264
  77.                         ENDR
  78.  
  79.  
  80. writeReference                    EQU        0
  81. readReference                    EQU        1
  82. fetchReference                    EQU        2
  83.  
  84. MemoryExceptionInformation RECORD    0
  85. theArea                     ds.l    1
  86. theAddress                 ds.l    1
  87. theError                 ds.l    1
  88. theReference             ds.l    1
  89. sizeof                     EQU    16
  90.                         ENDR
  91.  
  92.  
  93. unknownException                EQU        0
  94. illegalInstructionException        EQU        1
  95. trapException                    EQU        2
  96. accessException                    EQU        3
  97. unmappedMemoryException            EQU        4
  98. excludedMemoryException            EQU        5
  99. readOnlyMemoryException            EQU        6
  100. unresolvablePageFaultException    EQU        7
  101. privilegeViolationException        EQU        8
  102. traceException                    EQU        9
  103. instructionBreakpointException    EQU        10
  104. dataBreakpointException            EQU        11
  105. integerException                EQU        12
  106. floatingPointException            EQU        13
  107. stackOverflowException            EQU        14
  108. terminationException            EQU        15
  109.  
  110. ExceptionInfo             RECORD    0
  111. VariantLevel0Begin        EQU    *
  112. memoryInfo                 ds.l    1
  113. sizeof                     EQU    4
  114.                         ENDR
  115.  
  116. ExceptionInformationPowerPC RECORD    0
  117. theKind                     ds.l    1
  118. machineState             ds.l    1
  119. registerImage             ds.l    1
  120. FPUImage                 ds.l    1
  121. info                     ds.l    1
  122. sizeof                     EQU    20
  123.                         ENDR
  124.  
  125.     IF GENERATINGPOWERPC  THEN
  126.     ENDIF
  127. ; Note:    An ExceptionHandler is NOT a UniversalProcPtr.
  128. ;            It must be a native function pointer with NO routine descriptor. 
  129. ; Routine for installing per-process exception handlers 
  130.     ENDIF ; __MACHINEEXCEPTIONS__
  131.